3.46 \(\int \frac{-1+x^2}{1+x^2} \, dx\)

Optimal. Leaf size=6 \[ x-2 \tan ^{-1}(x) \]

[Out]

x - 2*ArcTan[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0150226, antiderivative size = 6, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ x-2 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[(-1 + x^2)/(1 + x^2),x]

[Out]

x - 2*ArcTan[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 4.39052, size = 5, normalized size = 0.83 \[ x - 2 \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2-1)/(x**2+1),x)

[Out]

x - 2*atan(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00666589, size = 6, normalized size = 1. \[ x-2 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Integrate[(-1 + x^2)/(1 + x^2),x]

[Out]

x - 2*ArcTan[x]

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 7, normalized size = 1.2 \[ x-2\,\arctan \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2-1)/(x^2+1),x)

[Out]

x-2*arctan(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.50244, size = 8, normalized size = 1.33 \[ x - 2 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)/(x^2 + 1),x, algorithm="maxima")

[Out]

x - 2*arctan(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.228536, size = 8, normalized size = 1.33 \[ x - 2 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)/(x^2 + 1),x, algorithm="fricas")

[Out]

x - 2*arctan(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.07292, size = 5, normalized size = 0.83 \[ x - 2 \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2-1)/(x**2+1),x)

[Out]

x - 2*atan(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.209032, size = 8, normalized size = 1.33 \[ x - 2 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 - 1)/(x^2 + 1),x, algorithm="giac")

[Out]

x - 2*arctan(x)